package com.shelpe.services.sinbad.service;

import java.util.List;

import com.shelpe.services.sinbad.model.RptKeyword;
import com.shelpe.services.sinbad.model.RptKeywordParam;

import lombok.Data;

public interface RptKeywordService {

	public List<RptKeyword> selectAll(Long userId);
	
	public List<RptKeyword> select(Long keywordId, Long adgroupId, Long campaignId, Long userId); 
	
	//汇总数据
	public RptKeyword selectSum(RptKeywordParam param);
	
	/**
	 * 根据条件获取keywordids
	 */
	public List<KeywordCompositeID> getKeywordIds(RptKeywordParam param);
	
	/**
	 * 获取宝贝均值ctr 
	 * @param param userId、 day、source、adgroupId 
	 * @return
	 */
	public Float getAvgCtr(RptKeywordParam param);
	
	/**
	 * 获取ctr、roi指标 
	 * @param param
	 * @return
	 */
	public RptKeyword getCtrAndRoi(RptKeywordParam param);
	
	/**
	 * 指标摘要
	 * @param param
	 * @return
	 */
	public RptKeyword getSummariesMetric(RptKeywordParam param);

	/**
	 * 趋势图  以推广单元分组
	 * @param param
	 * @return
	 */
	public List<RptKeyword> getReportsTrend(RptKeywordParam param);

	/**
	 * 趋势图  以日期分组
	 * @param param
	 * @return
	 */
	public List<RptKeyword> getReportsTrendByDate(RptKeywordParam param);
	
	public int delete(Long userId, String keywordIds);
	
	@Data
	public static class KeywordCompositeID{
		private long keywordID;
		private long campaignID;
		private long adgroupID;
		
		public KeywordCompositeID(){
			
		}
		public KeywordCompositeID(long keywordID, long campaignID, long adgroupID) {
			super();
			this.keywordID = keywordID;
			this.campaignID = campaignID;
			this.adgroupID = adgroupID;
		}
		
		
	}
	
}
